<template>
  <el-table :data="list" style="width: 100%;padding-top: 15px;">
    <el-table-column label="id" width="80">
      <template slot-scope="scope">
        {{ scope.row.record_id }}
      </template>
    </el-table-column>
    <el-table-column label="头像" width="70">
      <template slot-scope="scope">
        <img width="50" :src="scope.row.user_avatarUrl" alt="">
      </template>
    </el-table-column>
    <el-table-column label="金额" width="120" align="center">
      <template slot-scope="scope">
        ¥{{ scope.row.record_money }}
      </template>
    </el-table-column>
    <el-table-column label="类型" width="60" align="center">
      <template slot-scope="scope">
        <span>{{ scope.row.record_type === 1 ? '支出' : '收入' }}</span>
      </template>
    </el-table-column>
    <el-table-column label="分类" align="center">
      <template slot-scope="scope">
        {{ scope.row.record_category }}
      </template>
    </el-table-column>
    <el-table-column label="备注" align="center">
      <template slot-scope="scope">
        {{ scope.row.record_remark }}
      </template>
    </el-table-column>
    <el-table-column label="创建时间" width="100" align="center">
      <template slot-scope="scope">
        {{ scope.row.record_createtime }}
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  filters: {
    statusFilter(status) {
      const statusMap = {
        success: 'success',
        pending: 'danger'
      }
      return statusMap[status]
    },
    orderNoFilter(str) {
      return str.substring(0, 30)
    }
  },
  data() {
    return {
      list: [],
      listLoading: true,
      page: 1,
      total: 0,
      pageSize: 6
    }
  },
  created() {
  },
  methods: {}
}
</script>
